
<!DOCTYPE html>
<html lang="en">
    <head>
        <title> Swissmooh.co.th/product.php</title> 
        <meta   NAME="viewport" CONTENT="initial-scale=1.0, maximum-scale=1.0"  >

        <meta   NAME="ieSettings" CONTENT="IE=edge" http-equiv="X-UA-Compatible"  >

        <meta   NAME="description" CONTENT="Swissmooh"  >

        <meta   CHARSET="UTF-8"  >

        <link   NAME="central" REL="stylesheet" POS="1" TYPE="text/css" HREF="assets/css/swissmooh_1.css"  >

        <link   NAME="favicon" rel="shortcut icon" POS="100" TYPE="image/x-icon" HREF="resources/favicon.ico"  >

        <script   NAME="jquery" POS="1" SRC="assets/js/jquery-2.1.1.min.js"  ></script>

        <script   NAME="jqueryUI" POS="2" SRC="system/jqueryui/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js?t=2013-07-29"  ></script>

        <script   NAME="bootstrap" POS="3" SRC="assets/js/bootstrap.min.js"  ></script>

        <script   NAME="onsiteCMS" POS="4" SRC="assets/js/system.js" ></script>

        <script type="text/javascript" src="assets/js/jquerylightbox-05.js"></script>
        <link rel="stylesheet" type="text/css" href="assets/css/jquerylightbox-05.css" media="screen">

        <script type="text/javascript">
            function osBodyLoad() {
                setFocus();
            }
        </script>
    </head> 
    <div id="body">
    </div>

    <div id="swissHead" class="swissness"  >
        <div class="spacer3"><div class="fatborder"><div class="thinborder">
                    <div id="swissHeadInner" >
                        <img src="images/splash.png">
                        swiss<br/>mooh
                    </div></div></div></div>
    </div>
    <div id="navigation1">
        <div role="navigation" class="navbar navbar-default ">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <?php include './include/menu/TopMenu.php'; ?>
            </div><!--/.container-fluid -->
        </div>
    </div>
    <div id="navigation2" class="hidden-xs">
        <div role="navigation" class="navbar navbar-default ">
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="dropdown ">
                        <a href="index.php" >
                            <span class="glyphicon glyphicon-play" aria-hidden="true"></span> Home
                            <ul class="dropdown-menu"></ul>
                        </a>
                    </li>
                    <li class="dropdown ">
                        <a href="contact.php" >
                            <span class="glyphicon glyphicon-play" aria-hidden="true"></span> Contact
                            <ul class="dropdown-menu"></ul>
                        </a>
                    </li> 

                    <li >
                        <a href="http://www.swissmooh.com.cn/" target="_blank"  class="level1" >
                            <img class="worldwide cn" src="system/icons/flags/cn.png">
                        </a>
                    </li>
                    <li >
                        <a href="http://www.swissmooh.co.th/" class="level1" target="_blank"  >
                            <img class="worldwide tw" src="system/icons/flags/th.png">
                        </a>
                    </li>
                    <li >
                        <a href="#" class="level1" ><img class="worldwide gb" src="system/icons/flags/ch.png">
                        </a>
                    </li>			
                </ul>
            </div>
        </div>
    </div>



    <div id ="window" class="page">
        <div class="fatborder"><div class="fatborder">
                <div id="swissAlps" class="page">
                    <div id="mainContainer" >
                        <div class="page">


                            <ol class="breadcrumb">
                                <li>
                                </li>
                                <?php
                                $objConnect = mysql_connect($conf['dataBaseDomain'], $conf['dataBaseUsername'], $conf['dataBasePassword']) or die(mysql_error());
                                $objDB = mysql_select_db($conf['dataBaseName']) or die($config['connection_error_msg']);
                                mysql_query($config['msg_encode'], $objConnect);
                                //Search in menu level 3
                                $sqlGetMenuBreadcrumb = mysql_query("SELECT * FROM SWISS_MENU_LEVEL2 WHERE MENU_ID LIKE '" . $_GET['id'] . "'");
                                $NoOfLevelThree = mysql_num_rows($sqlGetMenuBreadcrumb);
                                if ($NoOfLevelThree > 0) {
                                    $rowFromLevel3 = mysql_fetch_assoc($sqlGetMenuBreadcrumb);
                                    $resultFromLevel3 = '<li><a class="pageTitle" href="#">' . $rowFromLevel3['MENU_NAME'] . '</a></li>';

                                    $sqlGetMenulevel2 = mysql_query("SELECT * FROM SWISS_MENU_LEVEL1 WHERE MENU_ID LIKE '" . $rowFromLevel3['REF_ID'] . "'");
                                    $NoOfLevelTwo = mysql_num_rows($sqlGetMenulevel2);
                                    if ($NoOfLevelTwo > 0) {
                                        $rowFromLevel2 = mysql_fetch_assoc($sqlGetMenulevel2);
                                        $resultFromLevel2 = '<li><a class="pageTitle" href="#">' . $rowFromLevel2['MENU_NAME'] . '</a></li>';

                                        $sqlGetMenuMain = mysql_query("SELECT * FROM SWISS_MENU WHERE MENU_ID LIKE '" . $rowFromLevel2['REF_ID'] . "'");
                                        $NoOfMain = mysql_num_rows($sqlGetMenuMain);
                                        if ($NoOfMain > 0) {
                                            $rowFromMain = mysql_fetch_assoc($sqlGetMenuMain);
                                            $resultFromMain = '<li><a class="pageTitle" href="#">' . $rowFromMain['MENU_NAME'] . '</a></li>';

                                            echo $resultFromMain . "" . $resultFromLevel2 . "" . $resultFromLevel3;
                                        }
                                    }
                                } else {
                                    $sqlGetMenulevel2 = mysql_query("SELECT * FROM SWISS_MENU_LEVEL1 WHERE MENU_ID LIKE '" . $_GET['id'] . "'");
                                    $NoOfLevelTwo = mysql_num_rows($sqlGetMenulevel2);
                                    if ($NoOfLevelTwo > 0) {
                                        $rowFromLevel2 = mysql_fetch_assoc($sqlGetMenulevel2);
                                        $resultFromLevel2 = '<li><a class="pageTitle" href="#">' . $rowFromLevel2['MENU_NAME'] . '</a></li>';
                                        $sqlGetMenuMain = mysql_query("SELECT * FROM SWISS_MENU WHERE MENU_ID LIKE '" . $rowFromLevel2['REF_ID'] . "'");
                                        $NoOfMain = mysql_num_rows($sqlGetMenuMain);
                                        if ($NoOfMain > 0) {
                                            $rowFromMain = mysql_fetch_assoc($sqlGetMenuMain);
                                            $resultFromMain = '<li><a class="pageTitle" href="#">' . $rowFromMain['MENU_NAME'] . '</a></li>';

                                            echo $resultFromMain . "" . $resultFromLevel2;
                                        }
                                    }
                                }
                                ?>
                            </ol>

                            <?php
                            $conf = parse_ini_file("include/model-db-connection/configuration.ini");
                            $mysqli = new mysqli($conf['dataBaseDomain'], $conf['dataBaseUsername'], $conf['dataBasePassword'], $conf['dataBaseName']);
                            if ($mysqli->connect_errno) {
                                echo "Failed to connect to MySQL: " . $mysqli->connect_error;
                            }
                            $productID = $_GET['id'];
                            $stmt2 = $mysqli->prepare("SELECT * FROM SWISS_PAGE_DESCRIPTION WHERE MENU_ID LIKE ?");
                            $stmt2->bind_param('s', $productID);
                            $stmt2->execute();
                            $meta2 = $stmt2->result_metadata();
                            while ($field2 = $meta2->fetch_field()) {
                                $parameters2[] = &$row2[$field2->name];
                            }
                            call_user_func_array(array($stmt2, 'bind_result'), $parameters2);
                            while ($stmt2->fetch()) {
                                foreach ($row2 as $key2 => $val2) {
                                    $x2[$key2] = $val2;
                                }
                                ?>
                                <div class="content">
                                    <?php
                                    if ($x2['PAGE_TYPE'] == 1) {
                                        ?>
                                        <div class="ProductPage customContent">
                                            <div class="texte">
                                                <h1><?= $x2['DESC_NAME'] ?></h1>
                                                <div class="ConTextblock font-sm font-xs">
                                                    <p align="LEFT">&nbsp;</p>
                                                    <?= $x2['DESC_DESC'] ?>
                                                    <p align="LEFT">&nbsp;</p>

                                                </div>

                                            </div>
                                            <div class="Resources" >
                                                <?php
                                                $sqlSelect = mysql_query("SELECT * FROM SWISS_IMAGE_CONTENT WHERE DESC_ID LIKE '" . $x2['DESC_ID'] . "'");
                                                while ($getImage = mysql_fetch_array($sqlSelect)) {
                                                    ?>
                                                    <a class="resource" href="<?= $conf['applicationImageServerPath'] ?><?= $getImage['IMAGE_NAME'] ?>"  onclick="return popupImage(this.href)">
                                                        <img src="<?= $conf['applicationImageServerPath'] ?><?= $getImage['IMAGE_NAME'] ?>"   border="0">
                                                    </a>
                                                    <?php
                                                }
                                                ?>
                                            </div>
                                        </div> 
                                        <div class="ProductPage customDetails">
                                            <div class="texte">
                                                <h2></h2>
                                                <div class="DetTextblock">
                                                </div>

                                                <div class="Resources" >
                                                    <?php
                                                    $sqlSelect2 = mysql_query("SELECT * FROM SWISS_FILE_CONTENT WHERE DESC_ID LIKE '" . $x2['DESC_ID'] . "'");
                                                    while ($getFile = mysql_fetch_array($sqlSelect2)) {
                                                        ?>
                                                        <div class="resource">
                                                            <a class="resource_pdf" href="<?= $conf['applicationFileServerPath'] ?><?= $getFile['FILE_NAME'] ?>" title="<?= $getFile['FILE_NAME'] ?>" target="document"><?= $getFile['FILE_NAME'] ?></a>
                                                        </div>
                                                    <?php } ?>
                                                </div>	
                                            </div>
                                        </div>
                                        <?php
                                    } else if ($x2['PAGE_TYPE'] == 2) {
                                        ?>
                                        <div class="ProductPage "> 
                                            <div class="texte">
                                                <div class="Headlines">
                                                    <h2 class="Name"><?= $x2['DESC_NAME'] ?></h2> 
                                                    <div class="Textblock">
                                                        <p>

                                                            <?= $x2['DESC_DESC'] ?>
                                                        </p>
                                                        <p>
                                                            <?php
                                                            $sqlSelect = mysql_query("SELECT * FROM SWISS_IMAGE_CONTENT WHERE DESC_ID LIKE '" . $x2['DESC_ID'] . "'");
                                                            while ($getImage = mysql_fetch_array($sqlSelect)) {
                                                                ?>
                                                                <a class="lightbox" href="<?= $conf['applicationImageServerPath'] ?><?= $getImage['IMAGE_NAME'] ?>"  onclick="">
                                                                    <img alt="" class="Proz20Links" src="<?= $conf['applicationImageServerPath'] ?><?= $getImage['IMAGE_NAME'] ?>" >
                                                                </a>
                                                                <?php
                                                            }
                                                            ?>                                                           
                                                        </p>
                                                        <p>&nbsp;</p>
                                                    </div> 
                                                </div>
                                            </div>
                                        </div>
                                        <?php
                                    } else if ($x2['PAGE_TYPE'] == 3) {
                                        ?>
                                        <div class="ProductPage "> 
                                            <div class="texte">
                                                <div class="Headlines">
                                                    <h2 class="Name"><?= $x2['DESC_NAME'] ?></h2> 
                                                    <div class="Textblock">
                                                        <h4><?= $x2['DESC_DESC'] ?></h4>
                                                        <p>
                                                            <?php
                                                            $sqlGetImageFromCA = mysql_query("SELECT * FROM SWISS_CA_MENU WHERE CA_POSITION_TYPE LIKE '" . $x2['DESC_ID'] . "'");
                                                            while ($getImageFromCA = mysql_fetch_array($sqlGetImageFromCA)) {
                                                                ?>
                                                                <a class="product" href="<?= $getImageFromCA['CA_LINK'] ?>"><?= $getImageFromCA['CA_NAME'] ?>
                                                                    <img alt="" src="<?= $conf['applicationImageServerPath'] ?><?= $getImageFromCA['CA_FILE_PATH'] ?>">
                                                                </a> 
                                                                <?php
                                                            }
                                                            ?>                                                          
                                                        </p>
                                                        <p>&nbsp;</p>
                                                    </div> 
                                                </div>
                                            </div>
                                        </div>
                                        <?php
                                    }
                                    ?>
                                </div> 
                                <?php
                            }
                            ?>
                        </div>	
                    </div>	
                </div>
            </div>
        </div>
        <div id="swissFoot" class="swissness" >
            <div class="spacer3">
                <div class="fatborder">
                    <div class="thinborder">
                        <div id="swissFootInner">
                            <font class="switzerland">Switzerland</font>
                            <font class="pureMilk">100% pure milk</font>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">

        $(document).ready(function () {
            $.fn.lightBox._show_image_data = function () {
            };
            $('a.resource').attr('onclick', '').lightBox();
            $('a.lightbox').attr('onclick', '').lightBox();


            /*
             $('a.resource>img').parent('a.resource').lightBox({overlayBgColor: '#000',
             overlayOpacity: 0.6,
             overlayClose:false, 
             imageLoading: 'system/jquery_lightbox/images/lightbox-ico-loading.gif',
             imageBtnClose: 'jqueryLightbox/close.png',
             imageBtnPrev: 'jqueryLightbox/pfeil_links.png',
             imageBtnNext: 'jqueryLightbox/pfeil_rechts.png',
             containerResizeSpeed: 1,
             txtImage: '',
             txtOf: ''});
             */

        });

    </script>

</body>
</html>
